﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Map : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string szLat = null;
        string szLon = null;
        int nLevel = 17;
        string sH = Request.QueryString["h"];
        string sW = Request.QueryString["w"];
        if (!IsPostBack)
        {
            szLat = Request.QueryString["lat"];
            szLon = Request.QueryString["lon"];
            
        }
        
        if ((szLat != null) && (szLon != null))
        {
            double dLat = Double.Parse(szLat);
            double dLon = Double.Parse(szLon);
            
            if (nLevel <= 19 && nLevel >= 11)
            {
               divimage.InnerHtml = "<img src='Services/CreateImage.ashx?lat=" + szLat + "&lon=" + szLon + "&level=" + nLevel + "&h="+ sH +"&w="+sW+"'/>";
        
            }
        }
    }
}